local FillEntry = class("FillEntry", require("app.views.slots.task.TaskEntry"))
local Config = require("app.views.slots.Config")

--[[
fill = { -- 消除后重新填补的symbol
    [1] = {2,2,2}, -- tid
    [2] = {2},
}]]
function FillEntry:ctor(fillData, reels)
    FillEntry.super.ctor(self)
    self._fillData = fillData
    self._reels = reels
    self._timer = 0
    self:addToQueue(self, self._init)
    self:addToQueue(self, self._step)
end

function FillEntry:_init()
    -- 填充新的symbols
    for col, v in ipairs(self._fillData) do
        self._reels[col]:fill(v)
    end
    for i, roll in ipairs(self._reels) do
        roll:updateSymbolsTargetPos()
    end
    return true
end

function FillEntry:_step(dt)
    self._timer = self._timer + dt
    if self._timer > 1.5 then
        print("fill finished")
        return true
    end
end

return FillEntry